package com.oreilly.ez.repo;

import com.oreilly.ez.entity.EzIndex;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;


public interface EzIndexRepo extends JpaRepository<EzIndex, Integer>{


    @Query("select  i from EzIndex  i where i.ezCate.sid = :sid order by cdate desc")
    List<EzIndex> findByCate(@Param("sid") Integer cateSid);
}
